package com.wrupple.muba.widget.client.widgets;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.ParagraphElement;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockLayoutPanel.Direction;
import com.google.gwt.user.client.ui.Widget;
import com.wrupple.muba.widget.client.widgets.toolbar.Toolbar;

public class BigFatMessage extends Composite implements Toolbar{

	private static BigFatMessageUiBinder uiBinder = GWT.create(BigFatMessageUiBinder.class);

	interface BigFatMessageUiBinder extends UiBinder<Widget, BigFatMessage> {
	}

	@UiField
	ParagraphElement p;

	public BigFatMessage(String message) {
		initWidget(uiBinder.createAndBindUi(this));
		if (message != null) {
			p.setInnerText(message);
		}
	}


	@Override
	public HandlerRegistration addResizeHandler(ResizeHandler handler) {
		return null;
	}

	public void setTitlebarText(String title) {
		p.setInnerText(title);
	}

	@Override
	public Direction getDirection() {
		return Direction.NORTH;
	}

	@Override
	public int getSize() {
		return 160;
	}

}
